/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
    color: #333;
    background-image: url('../bj.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    line-height: 1.5;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: #1890ff;
}

ul {
    list-style: none;
}

button {
    cursor: pointer;
    border: none;
    outline: none;
}

/* 登录页样式 */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-image: url('../bj.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.login-box {
    position: relative;
    z-index: 2;
    width: 400px;
    padding: 40px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    overflow: hidden;
}

.login-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.login-box:hover::before {
    left: 100%;
}

.login-box:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 15px 40px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.3);
}

.login-box h1 {
    text-align: center;
    color: #ffffff;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    font-weight: 600;
}

.login-box h2 {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 30px;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    transition: all 0.3s;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #ffffff;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 
        0 0 0 3px rgba(255, 255, 255, 0.1),
        inset 0 1px 3px rgba(0, 0, 0, 0.1);
    outline: none;
    background: rgba(255, 255, 255, 0.15);
}

.form-hint {
    display: block;
    font-size: 12px;
    color: #666;
    margin-top: 5px;
    line-height: 1.4;
}

.api-provider-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.suggestion-btn {
    background-color: #f0f2f5;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 12px;
    color: #333;
    cursor: pointer;
    transition: all 0.2s;
}

.suggestion-btn:hover {
    background-color: #e6f7ff;
    border-color: #1890ff;
    color: #1890ff;
}

.btn-primary {
    background: linear-gradient(135deg, rgba(24, 144, 255, 0.8), rgba(24, 144, 255, 0.6));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 4px 15px rgba(24, 144, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover {
    background: linear-gradient(135deg, rgba(24, 144, 255, 0.9), rgba(24, 144, 255, 0.7));
    transform: translateY(-2px);
    box-shadow: 
        0 6px 20px rgba(24, 144, 255, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 
        0 2px 10px rgba(24, 144, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-secondary {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: rgba(255, 255, 255, 0.9);
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    margin-right: 10px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.2));
    transform: translateY(-1px);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}


/* 管理界面布局 */
.admin-container {
    display: flex;
    min-height: 100vh;
    position: relative;
}

.admin-container::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 0;
    pointer-events: none;
}

.sidebar {
    width: 280px;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    color: #fff;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 2;
    border-right: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 
        4px 0 30px rgba(0, 0, 0, 0.2),
        inset -1px 0 0 rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    overflow-y: auto;
}

.sidebar:hover {
    background: rgba(0, 0, 0, 0.5);
    border-right-color: rgba(255, 255, 255, 0.2);
}

/* 自定义滚动条样式 */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    transition: background 0.3s ease;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.logo {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    position: relative;
    overflow: hidden;
}

.logo::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.6s ease;
}

.logo:hover::before {
    left: 100%;
}

.logo h1 {
    font-size: 1.8rem;
    color: #ffffff;
    text-align: center;
    text-shadow: 0 3px 6px rgba(0, 0, 0, 0.4);
    font-weight: 700;
    letter-spacing: 1px;
    position: relative;
    z-index: 1;
}

.main-nav {
    flex: 1;
    padding: 24px 0;
    background: rgba(255, 255, 255, 0.02);
    overflow-y: auto;
    min-height: 0;
}

/* 导航区域滚动条样式 */
.main-nav::-webkit-scrollbar {
    width: 4px;
}

.main-nav::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
}

.main-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    transition: background 0.3s ease;
}

.main-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
}

.main-nav ul li {
    padding: 6px 20px;
    margin-bottom: 4px;
}

.main-nav ul li a {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    color: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    margin: 0 16px;
    transition: all 0.3s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
    font-weight: 500;
    font-size: 15px;
}

.main-nav ul li a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.main-nav ul li a:hover::before {
    left: 100%;
}

.main-nav ul li a:hover,
.main-nav ul li.active a {
    color: #ffffff;
    background: linear-gradient(135deg, rgba(24, 144, 255, 0.3), rgba(24, 144, 255, 0.2));
    border-color: rgba(24, 144, 255, 0.4);
    transform: translateX(6px);
    box-shadow: 
        0 6px 20px rgba(24, 144, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.main-nav ul li.active a {
    background: linear-gradient(135deg, rgba(24, 144, 255, 0.4), rgba(24, 144, 255, 0.3));
    border-color: rgba(24, 144, 255, 0.5);
    box-shadow: 
        0 8px 25px rgba(24, 144, 255, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.user-info {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    position: relative;
    overflow: hidden;
    margin-top: auto;
    flex-shrink: 0;
}

.user-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transition: left 0.6s ease;
}

.user-info:hover::before {
    left: 100%;
}

.user-info span {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    font-weight: 500;
    position: relative;
    z-index: 1;
}

.btn-logout {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.2), rgba(255, 107, 107, 0.1));
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 107, 107, 0.3);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    font-weight: 500;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.btn-logout::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.4s ease;
}

.btn-logout:hover::before {
    left: 100%;
}

.btn-logout:hover {
    color: #ffffff;
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.3), rgba(255, 107, 107, 0.2));
    border-color: rgba(255, 107, 107, 0.4);
    transform: translateY(-2px);
    box-shadow: 
        0 4px 15px rgba(255, 107, 107, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
    z-index: 1;
    margin-left: 280px;
    min-height: 100vh;
}

.page-header {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 2;
}

.page-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.header-actions {
    display: flex;
    gap: 10px;
}

.content-container {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    position: relative;
    z-index: 1;
}

/* 视图切换 */
.view {
    display: none;
}

.view.active {
    display: block;
}

/* 过滤器栏 */
.filter-bar {
    margin-bottom: 20px;
    display: flex;
    gap: 15px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.search-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    transition: all 0.3s;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    color: #ffffff;
    font-size: 14px;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.search-input:focus {
    border-color: rgba(24, 144, 255, 0.5);
    box-shadow: 
        0 0 0 3px rgba(24, 144, 255, 0.1),
        inset 0 1px 3px rgba(0, 0, 0, 0.1);
    outline: none;
    background: rgba(255, 255, 255, 0.15);
}

.filter-select {
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    transition: all 0.3s;
    min-width: 150px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    color: #ffffff;
    font-size: 14px;
}

.filter-select:focus {
    border-color: rgba(24, 144, 255, 0.5);
    box-shadow: 
        0 0 0 3px rgba(24, 144, 255, 0.1),
        inset 0 1px 3px rgba(0, 0, 0, 0.1);
    outline: none;
    background: rgba(255, 255, 255, 0.15);
}

/* 数据表格 */
.data-table-container {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 12px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    overflow-x: auto;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.data-table th {
    background: rgba(255, 255, 255, 0.1);
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.data-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.avatar-cell {
    width: 40px;
    height: 40px;
    overflow: hidden;
    border-radius: 50%;
}

.avatar-cell img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.action-cell {
    white-space: nowrap;
}

.btn-action {
    padding: 5px 12px;
    border-radius: 4px;
    margin-right: 8px;
    font-size: 12px;
}

.btn-edit {
    background-color: #faad14;
    color: white;
}

.btn-edit:hover {
    background-color: #e8a010;
}

.btn-delete {
    background-color: #f5222d;
    color: white;
}

.btn-delete:hover {
    background-color: #e01e2a;
}

.btn-view {
    background-color: #1890ff;
    color: white;
}

.btn-view:hover {
    background-color: #096dd9;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
    gap: 8px;
}

.pagination-btn {
    background-color: white;
    border: 1px solid #d9d9d9;
    padding: 6px 12px;
    border-radius: 4px;
    transition: all 0.3s;
}

.pagination-btn:hover,
.pagination-btn.active {
    border-color: #1890ff;
    color: #1890ff;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 600px;
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content.modal-large {
    width: 80%;
    max-width: 1000px;
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.close-btn {
    font-size: 24px;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.3s;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.close-btn:hover {
    color: #ffffff;
    transform: scale(1.1);
}

.modal-body {
    padding: 24px;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* 设置面板 */
.settings-panel {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 12px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.settings-panel h3 {
    margin-bottom: 20px;
    font-size: 1.1rem;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    font-weight: 600;
}

/* 交互详情样式 */
.interaction-details {
    margin-bottom: 20px;
}

.detail-row {
    display: flex;
    margin-bottom: 8px;
}

.detail-label {
    width: 80px;
    color: #666;
    font-weight: 500;
}

.interaction-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.message {
    padding: 16px;
    border-radius: 4px;
}

.message h4 {
    margin-bottom: 10px;
    font-size: 14px;
    color: #666;
}

.message-content {
    white-space: pre-wrap;
    word-break: break-word;
}

.user-message {
    background-color: #f9f9f9;
}

.ai-message {
    background-color: #e6f7ff;
}

/* 视图容器样式 */
.view-container {
    display: flex;
    gap: 20px;
}

.view-info {
    flex: 1;
    padding-right: 20px;
    border-right: 1px solid #e8e8e8;
}

.view-test {
    flex: 1;
    padding-left: 20px;
}

.view-avatar {
    text-align: center;
    margin-bottom: 20px;
}

.view-avatar img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 3px solid #f0f2f5;
    object-fit: cover;
}

.info-item {
    margin-bottom: 15px;
}

.info-item label {
    font-weight: bold;
    color: #555;
    margin-right: 10px;
}

.info-item pre {
    background-color: #f5f5f5;
    padding: 10px;
    border-radius: 4px;
    overflow-x: auto;
    margin-top: 5px;
    font-family: 'Courier New', monospace;
    white-space: pre-wrap;
}

.test-form {
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
}

.test-result {
    margin-top: 20px;
    padding: 10px;
    background-color: #f5f5f5;
    border-radius: 4px;
}

.test-result h4 {
    margin-bottom: 10px;
    color: #333;
    font-size: 16px;
}

#testResponse {
    background-color: #fff;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
    min-height: 150px;
    max-height: 300px;
    overflow-y: auto;
    white-space: pre-wrap;
}

.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#testLoading {
    text-align: center;
    color: #666;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .sidebar {
        width: 100%;
        position: fixed;
        top: 0;
        left: 0;
        height: auto;
        max-height: 100vh;
        z-index: 1000;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
    }
    
    .main-nav ul {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .main-nav ul li {
        padding: 5px 10px;
        margin-bottom: 8px;
    }
    
    .user-info {
        padding: 15px 20px;
        margin-top: 0;
    }
    
    .view-container {
        flex-direction: column;
    }
    
    .view-info {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding-right: 0;
        padding-bottom: 20px;
    }
    
    .view-test {
        padding-left: 0;
        padding-top: 20px;
    }
}

/* API密钥管理样式 */
.status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.status-active {
    background-color: #d4edda;
    color: #155724;
}

.status-inactive {
    background-color: #f8d7da;
    color: #721c24;
}

.btn-edit, .btn-test, .btn-delete {
    padding: 4px 8px;
    margin: 0 2px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.btn-edit {
    background-color: #007bff;
    color: white;
}

.btn-edit:hover {
    background-color: #0056b3;
}

.btn-test {
    background-color: #28a745;
    color: white;
}

.btn-test:hover {
    background-color: #1e7e34;
}

.btn-delete {
    background-color: #dc3545;
    color: white;
}

.btn-delete:hover {
    background-color: #c82333;
}

/* 数据导出功能样式 */
.data-export-section {
    margin-top: 20px;
}

.section-description {
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.5;
}

.export-options {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.checkbox-item:hover {
    background-color: #e9ecef;
}

.checkbox-item input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
}

.checkbox-item span {
    font-size: 14px;
    color: #333;
    user-select: none;
}

.export-status {
    margin-top: 20px;
    padding: 15px;
    background: #e3f2fd;
    border: 1px solid #bbdefb;
    border-radius: 4px;
}

.loading-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #1976d2;
    font-size: 14px;
}

.loading-indicator::before {
    content: "";
    width: 16px;
    height: 16px;
    border: 2px solid #e3f2fd;
    border-top: 2px solid #1976d2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 社区图片管理样式 */
.shared-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 20px 0;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* 响应式网格布局 */
@media (max-width: 768px) {
    .shared-images-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
        padding: 15px 0;
    }
}

@media (max-width: 480px) {
    .shared-images-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 15px 0;
    }
    
    .image-card {
        max-width: 100%;
    }
}

.images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.image-card {
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    min-height: 280px;
    max-height: 320px;
}

.image-card:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 15px 40px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.2);
}

.image-thumbnail {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f5f5f5;
}

.image-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-preview {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: #f5f5f5;
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.image-card:hover .image-preview img {
    transform: scale(1.05);
}

.image-info {
    padding: 8px 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.image-info h4 {
    margin: 0 0 2px 0;
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    line-height: 1.1;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 1.3em;
}

/* 单行信息栏 */
.image-info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 4px;
    padding: 4px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.image-title-category {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.image-title-category h4 {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80px;
}

.image-title-category .category-badge {
    font-size: 9px;
    color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.1);
    padding: 1px 4px;
    border-radius: 3px;
    white-space: nowrap;
}

.image-stats-compact {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.8);
}

.image-stats-compact span {
    display: flex;
    align-items: center;
    gap: 1px;
    padding: 1px 3px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.image-stats-compact .icon {
    font-size: 10px;
    opacity: 0.8;
}

.image-stats-compact .icon.user {
    color: #8b5cf6;
}

.image-stats-compact .icon.ai {
    color: #06b6d4;
}

.image-stats-compact .icon.heart {
    color: #ec4899;
}

.image-actions-compact {
    display: flex;
    gap: 4px;
}

.btn-action-compact {
    padding: 2px 6px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 9px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-delete-compact {
    background-color: #dc3545;
    color: white;
}

.btn-delete-compact:hover {
    background-color: #c82333;
    transform: translateY(-1px);
}

/* 保留原有样式作为备用 */
.image-stats {
    display: flex;
    gap: 8px;
    margin: 6px 0;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    align-items: center;
}

.image-stats span {
    display: flex;
    align-items: center;
    gap: 2px;
    font-size: 11px;
    padding: 2px 4px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    transition: all 0.2s ease;
}

.image-stats span:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

/* 图标样式 */
.image-stats .icon {
    font-size: 12px;
    opacity: 0.8;
}

.image-stats .icon.user {
    color: #8b5cf6;
}

.image-stats .icon.ai {
    color: #06b6d4;
}

.image-stats .icon.heart {
    color: #ec4899;
}

.image-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 6px;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.6);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.image-meta span {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 1px 3px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.03);
}

.image-actions {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    margin-top: 8px;
    padding-top: 6px;
}

.btn-action {
    padding: 4px 8px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-view {
    background-color: #007bff;
    color: white;
}

.btn-view:hover {
    background-color: #0056b3;
}

.btn-delete {
    background-color: #dc3545;
    color: white;
}

.btn-delete:hover {
    background-color: #c82333;
}

.btn-delete-small {
    padding: 4px 8px;
    background-color: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.btn-delete-small:hover {
    background-color: #c82333;
}

.no-data, .error-message {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 16px;
}

.error-message {
    color: #dc3545;
}

/* 图片详情模态框样式 */
.image-detail-modal .modal-content {
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
}

/* 新版图片详情样式 */
.image-detail-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.image-preview {
    position: relative;
    background-color: #f5f5f5;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
    max-height: 60vh;
}

.image-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 6px;
    cursor: zoom-in;
}

/* 全屏图片查看样式 */
.fullscreen-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.fullscreen-content {
    position: relative;
    width: 90%;
    height: 90%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.fullscreen-content img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.close-fullscreen {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

.close-fullscreen:hover {
    color: #ccc;
}

.image-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.info-item {
    display: flex;
    flex-wrap: wrap;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.info-item label {
    font-weight: 600;
    color: #666;
    min-width: 80px;
    margin-right: 10px;
}

.info-item span, .info-item p {
    flex: 1;
    color: #333;
    word-break: break-word;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    background-color: #e9ecef;
    color: #495057;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.image-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

@media (max-width: 768px) {
    .image-preview {
        min-height: 200px;
    }
}

.image-detail-container {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.image-detail-preview {
    flex: 1;
    max-width: 400px;
}

.image-detail-preview img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.image-detail-info {
    flex: 1;
    min-width: 300px;
}

.image-detail-info h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 24px;
}

.image-detail-meta {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.image-detail-meta .meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.image-detail-meta .meta-label {
    font-weight: 600;
    color: #666;
    min-width: 80px;
}

.image-detail-meta .meta-value {
    color: #333;
    flex: 1;
}

.image-detail-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn-delete-image {
    background: #ff4d4f;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.btn-delete-image:hover {
    background: #ff7875;
    transform: translateY(-1px);
}

.image-preview {
    max-width: 100%;
    max-height: 400px;
    object-fit: contain;
    border-radius: 8px;
    margin-bottom: 20px;
}

.image-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.detail-item {
    display: flex;
    flex-direction: column;
}

.detail-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    font-size: 14px;
}

.detail-value {
    color: #666;
    font-size: 14px;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.tag {
    background-color: #e9ecef;
    color: #495057;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

/* API提供商建议按钮样式 */
.provider-suggestions {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.suggestion-label {
    font-size: 12px;
    color: #666;
    margin-right: 4px;
}

.provider-btn {
    background: #f0f0f0;
    border: 1px solid #d9d9d9;
    color: #333;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.provider-btn:hover {
    background: #1890ff;
    border-color: #1890ff;
    color: white;
    transform: translateY(-1px);
}

.provider-btn:active {
    transform: translateY(0);
}

/* 头像上传组件样式 */
.avatar-upload-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.avatar-preview {
    width: 120px;
    height: 120px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.3s ease;
    position: relative;
    overflow: hidden;
}

.avatar-preview:hover {
    border-color: #007bff;
}

.avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

.upload-placeholder {
    text-align: center;
    color: #666;
    font-size: 14px;
    padding: 10px;
}

.upload-actions {
    display: flex;
    gap: 10px;
}

.upload-actions button {
    padding: 6px 12px;
    font-size: 14px;
}

@media (max-width: 768px) {
    .filter-bar {
        flex-direction: column;
    }
    
    .action-cell .btn-action {
        margin-bottom: 5px;
    }
    
    .images-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
    }
    
    .image-details {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .avatar-preview {
        width: 100px;
        height: 100px;
    }
}

/* ==================== 文件管理样式 ==================== */

.file-stats-panel {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.stat-card {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 15px;
    text-align: center;
    border-left: 4px solid #1890ff;
}

.stat-card h4 {
    color: #666;
    font-size: 14px;
    margin-bottom: 8px;
    font-weight: normal;
}

.stat-value {
    font-size: 24px;
    font-weight: bold;
    color: #1890ff;
}

.file-cleanup-panel {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.cleanup-actions {
    margin: 15px 0;
    display: flex;
    gap: 10px;
}

.cleanup-results,
.unused-files-list {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #52c41a;
}

.cleanup-results h4,
.unused-files-list h4 {
    color: #333;
    margin-bottom: 10px;
}

.file-list {
    max-height: 300px;
    overflow-y: auto;
    margin-top: 10px;
}

.file-list li {
    padding: 5px 0;
    border-bottom: 1px solid #eee;
    font-family: monospace;
    font-size: 13px;
}

.file-list li:last-child {
    border-bottom: none;
}

.cleanup-results .error {
    color: #ff4d4f;
    font-weight: bold;
    margin-top: 10px;
}

/* API配置页面样式 */
.config-panel {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.config-description {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 24px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 8px;
    border-left: 4px solid rgba(24, 144, 255, 0.6);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.config-form {
    max-width: 800px;
}

.config-section {
    margin-bottom: 32px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.section-header h4 {
    margin: 0;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.section-status {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.section-status:contains("未配置") {
    background: #fff2e8;
    color: #fa8c16;
}

.section-status:contains("已配置") {
    background: #f6ffed;
    color: #52c41a;
}

.section-status:contains("可选") {
    background: #f0f0f0;
    color: #666;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    color: #ffffff;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: rgba(24, 144, 255, 0.5);
    box-shadow: 
        0 0 0 3px rgba(24, 144, 255, 0.1),
        inset 0 1px 3px rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.15);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.form-group input[readonly] {
    background-color: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.6);
    border-color: rgba(255, 255, 255, 0.2);
}

.form-hint {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.config-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding-top: 24px;
    border-top: 1px solid #e8e8e8;
    margin-top: 24px;
}

.config-status-panel {
    margin-top: 24px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e8e8e8;
}

.config-status-panel h4 {
    margin: 0 0 12px 0;
    color: #333;
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e8e8e8;
}

.status-item:last-child {
    border-bottom: none;
}

.status-label {
    font-weight: 500;
}

.status-value {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.status-success {
    background: #f6ffed;
    color: #52c41a;
}

.status-error {
    background: #fff2f0;
    color: #ff4d4f;
}

.status-warning {
    background: #fff7e6;
    color: #fa8c16;
}

/* 输入框切换按钮样式 */
.input-with-toggle {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-toggle input {
    padding-right: 40px;
}

.toggle-visibility {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    color: rgba(255, 255, 255, 0.7);
}

.toggle-visibility:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
}

.eye-icon {
    font-size: 16px;
}

/* 单个配置保存按钮样式 */
.config-actions-single {
    margin-top: 16px;
    display: flex;
    justify-content: flex-end;
}

.btn-save-single {
    background: linear-gradient(135deg, rgba(24, 144, 255, 0.8), rgba(24, 144, 255, 0.6));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 4px 15px rgba(24, 144, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

.btn-save-single:hover {
    background: linear-gradient(135deg, rgba(24, 144, 255, 0.9), rgba(24, 144, 255, 0.7));
    transform: translateY(-1px);
    box-shadow: 
        0 6px 20px rgba(24, 144, 255, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* 配置状态面板样式 */
.config-status-panel {
    margin-top: 24px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.config-status-panel h4 {
    margin: 0 0 12px 0;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.status-item:last-child {
    border-bottom: none;
}

.status-label {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.status-value {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.status-success {
    background: rgba(82, 196, 26, 0.2);
    color: #52c41a;
    border: 1px solid rgba(82, 196, 26, 0.3);
}

.status-error {
    background: rgba(255, 77, 79, 0.2);
    color: #ff4d4f;
    border: 1px solid rgba(255, 77, 79, 0.3);
}

.status-warning {
    background: rgba(250, 140, 22, 0.2);
    color: #fa8c16;
    border: 1px solid rgba(250, 140, 22, 0.3);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .config-actions {
        flex-direction: column;
    }
    
    .config-actions button {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .cleanup-actions {
        flex-direction: column;
    }
    
    .stat-value {
        font-size: 20px;
    }
}

/* ==================== 用户管理样式 ==================== */

/* 角色徽章样式 */
.role-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    display: inline-block;
}

.role-admin {
    background-color: #ff6b6b;
    color: white;
}

.role-user {
    background-color: #4ecdc4;
    color: white;
}

/* 用户头像样式 */
.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ddd;
}

/* 用户详情头像样式 */
.user-detail-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #ddd;
    margin-bottom: 15px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* 用户复选框样式 */
.user-checkbox {
    transform: scale(1.2);
    margin: 0;
}

/* 用户表格列宽设置 */
#usersTable th:first-child,
#usersTable td:first-child {
    width: 40px;
    text-align: center;
}

#usersTable th:nth-child(2),
#usersTable td:nth-child(2) {
    width: 60px;
    text-align: center;
}

#usersTable th:nth-child(3),
#usersTable td:nth-child(3) {
    width: 60px;
    text-align: center;
}

#usersTable th:last-child,
#usersTable td:last-child {
    width: 200px;
    text-align: center;
}

/* 分页组件样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 20px 0;
}

.pagination-btn {
    padding: 8px 12px;
    border: 1px solid #ddd;
    background: white;
    color: #333;
    cursor: pointer;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.2s;
}

.pagination-btn:hover:not(:disabled) {
    background: #f5f5f5;
    border-color: #999;
}

.pagination-btn.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.pagination-btn:disabled {
    background: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
    border-color: #dee2e6;
}

.pagination-ellipsis {
    padding: 8px 4px;
    color: #6c757d;
}

.pagination-info {
    text-align: center;
    color: #6c757d;
    font-size: 14px;
    margin-top: 10px;
}

/* 用户管理响应式设计 */
@media (max-width: 768px) {
    .user-avatar {
        width: 30px;
        height: 30px;
    }
    
    .user-detail-avatar {
        width: 60px;
        height: 60px;
    }
    
    #usersTable th:last-child,
    #usersTable td:last-child {
        width: 150px;
    }
    
    .role-badge {
        font-size: 10px;
        padding: 2px 6px;
    }
    
    #usersTable th:nth-child(3),
    #usersTable td:nth-child(3),
    #usersTable th:nth-child(4),
    #usersTable td:nth-child(4) {
        display: none;
    }
    
    .user-checkbox {
        transform: scale(1.2);
    }
    
    .pagination {
        flex-wrap: wrap;
        gap: 4px;
    }
    
    .pagination-btn {
        padding: 6px 10px;
        font-size: 12px;
    }
}